@import "~antd/es/style/themes/default.less";
@import "~antd/dist/antd.less";

html,
body,
#root {
  height: 100%;
}

.colorWeak {
  filter: invert(80%);
}

.ant-layout {
  min-height: 100vh;
}

.ant-pro-sider.ant-layout-sider.ant-pro-sider-fixed {
  left: unset;
}

canvas {
  display: block;
}

body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

ul,
ol {
  list-style: none;
}

@media (max-width: @screen-xs) {
  .ant-table {
    width: 100%;
    overflow-x: auto;

    &-thead > tr,
    &-tbody > tr {
      > th,
      > td {
        white-space: pre;

        > span {
          display: block;
        }
      }
    }
  }
}

// Compatible with IE11
@media screen and(-ms-high-contrast: active), (-ms-high-contrast: none) {
  body .ant-design-pro > .ant-layout {
    min-height: 100vh;
  }
}

// .ant-pro-global-header-layout-mix {
//   background-color: #1f8ffb !important;
// }

.ant-pro-form-login-container {
  justify-content: center;
}

.ant-pro-form-login-header {
  margin-bottom: 20px;
}

.primary {
  color: #0074ff;
}

.red {
  color: red;
}

.ant-descriptions-item-content .ant-form-item {
  margin-bottom: 0px !important;
}

.ant-descriptions-item-label {
  width: 20% !important;
}

.ant-descriptions-item-content {
  min-width: 30% !important;
  max-width: 80% !important;
}

.ant-tree .ant-tree-treenode {
  display: block;
  width: 100%;

  .ant-tree-node-content-wrapper {
    display: block;
    width: 100%;
  }
}

// 设置按钮圆角
.ant-btn {
  border-radius: 17px;
}
.ant-input-affix-wrapper,
.ant-select-selector,
.ant-select:not(.ant-select-customize-input) .ant-select-selector,
.ant-picker-range {
  border-radius: 10px;
}
.ant-pro-table .ant-pro-table-search {
  border-radius: 14px;
}
.ant-pro-table .ant-pro-card {
  border-radius: 14px;
}
// 重置菜单颜色
.ant-pro-sider-logo {
  background-color: #2b2a33;
}
.ant-menu.ant-menu-dark,
.ant-menu-dark .ant-menu-sub,
.ant-menu.ant-menu-dark .ant-menu-sub {
  color: rgba(255, 255, 255, 0.65);
  background: #2b2a33;
}
.ant-menu-dark.ant-menu-dark:not(.ant-menu-horizontal) .ant-menu-item-selected {
  background-color: #201e2b;
}
.ant-menu-dark.ant-menu-inline .ant-menu-item::after,
.ant-menu-dark.ant-menu-vertical .ant-menu-item::after,
.ant-menu-dark.ant-menu-vertical-left .ant-menu-item::after,
.ant-menu-dark.ant-menu-vertical-right .ant-menu-item::after {
  left: 0;
  width: 4px;
  height: 100%;
  background: #3565fe;
}

// tagView
.my-header-wrap {
  background: #f2f4f7;
  .my-header {
    position: relative;
    display: flex;
    align-items: center;
    height: 104px;
    color: #000000;
    font-weight: 400;
    font-size: 13px;
    .bg {
      position: absolute;
      z-index: 0;
      width: 100%;
      height: 104px;
    }
    .other-info {
      position: absolute;
      z-index: 1;
      display: flex;
      align-items: center;
      width: 100%;
      height: 104px;
      padding: 0 30px 30px;
      .date-moment {
        color: #000;
        font-weight: 400;
        font-size: 13px;
      }
    }
  }
  .my-tag-view {
    display: flex;
    align-items: center;
    height: 60px;
    padding: 0 20px;
    overflow-x: auto;
    background: #f2f4f7;
  }
  .my-tag-view-btns {
    display: flex;
    align-items: center;
    height: 100%;
    overflow-x: auto;
    .my-tag-view-btn {
      width: 100px;
      height: 38px;
      margin-right: 8px;
      border-radius: 10px;
      &:last-child {
        margin-right: 0;
      }
    }
  }
}
// 表格标题
.my-table-title {
  position: relative;
  padding-left: 30px;
  color: #000000;
  font-weight: 500;
  font-size: 20px;
  &::before {
    position: absolute;
    top: 50%;
    left: 0;
    display: block;
    width: 20px;
    height: 20px;
    background: rgba(53, 101, 254, 0.25);
    border-radius: 50%;
    transform: translateY(-50%);
    content: "";
  }
  &::after {
    position: absolute;
    top: 50%;
    left: 5px;
    z-index: 1;
    display: block;
    width: 11px;
    height: 11px;
    background: #3565fe;
    border-radius: 50%;
    transform: translateY(-50%);
    content: "";
  }
}

.ant-pro-basicLayout-content {
  margin: 60px 20px 20px !important;
  // margin: 0 20px 20px;
}
.ant-pro-page-container-children-content {
  margin: 0;
}
.ant-page-header-footer .ant-tabs > .ant-tabs-nav::before {
  border-bottom: 1px solid #e6e6e6;
}

// 弹框表单底部按钮
// .ant-modal-footer {
//   display: flex;
//   align-items: center;
//   justify-content: center;
//   .ant-btn {
//     width: 150px;
//     height: 40px;
//     font-size: 14px;
//   }
// }

// 启用/禁用前的标记
.my-badge-success {
  position: relative;
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  background-color: #00b171;
  border-radius: 50%;
  &::before {
    position: absolute;
    top: 50%;
    left: -50%;
    display: block;
    width: 16px;
    height: 16px;
    background: rgba(0, 177, 113, 0.17);
    border-radius: 50%;
    transform: translate(2px, -50%);
    content: "";
  }
}
.my-badge-error {
  .my-badge-success;
  background-color: #ff452d;
  &::before {
    background: rgba(244, 62, 61, 0.17);
  }
}

// 分页居中
// .ant-table-pagination-right {
//   justify-content: center !important;
// }
.my-delete-btn,
.my-delete-btn:hover {
  height: 26px;
  padding: 0 14px;
  color: #f86464 !important;
  font-weight: 500;
  font-size: 13px;
  line-height: 1;
  background: rgba(248, 100, 100, 0.15) !important;
  border: none;
  border-radius: 13px;
}

.my-upload-btn,
.my-upload-btn:hover {
  height: 26px;
  padding: 0 14px;
  color: #40d367 !important;
  font-weight: 500;
  font-size: 13px;
  line-height: 1;
  background: rgba(64, 211, 103, 0.15) !important;
  border: none;
  border-radius: 13px;
  cursor: pointer;
}
.my-detail-btn,
.my-detail-btn:hover {
  height: 26px;
  padding: 0 14px;
  color: #0074ff !important;
  font-weight: 500;
  font-size: 13px;
  line-height: 1;
  background: rgba(0, 116, 255, 0.15) !important;
  border: none;
  border-radius: 13px;
}
.my-export-btn {
  span {
    text-decoration: underline;
  }
}
